package com.cn.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by chenyuncong on 2019/3/27.
 */
@Table(name="run_status_report")
@Data
public class RunStatusReport {

    @Id
    private Integer id;

    @Column(name = "object_id")
    private Integer objectId;//设备端数据库(objectId)用来对接用

    @Column(name = "customer_name")
    private String customerName;//客户名称

    @Column(name = "company_id")
    private Integer companyId;//公司ID信息

    @Column(name = "mac", length = 255)
    private String mac;//机器唯一编码.mac地址

    @Column(name = "ip", length = 255)
    private String ip;//设备IP

    @Column(name = "mac_run_status")
    private Integer macRunStatus;//机器当前所属状态(9:停机断电,3:正常运行,2:普通停机,1:故障停机)

    @Column(name = "start_time")
    private Date startTime;//客户端数据开始时间

    @Column(name = "end_time")
    private Date endTime;//客户端数据结束时间

    @Column(name = "last_time")
    private Integer lastTime;//最后持续时间(分钟)

    @Column(name = "add_time")
    private Date addTime;// 服务器数据创建时间

    @Column(name = "today")
    private Integer today;//当天日期(yyyyMMdd)

    @Column(name = "all_control_data", columnDefinition = "TEXT", nullable = true)
    private String allControlData;

    @Column(name = "production_line_id")
    private Integer productionLineId;//生产线

    @Column(name = "spring_optimal_count")
    private Integer springOptimalCount;//弹簧优品量

    @Column(name = "spring_total_count")
    private Integer springTotalCount;//弹簧总量

    @Column(name = "viscose_total_count")
    private Integer viscoseTotalCount; //粘胶机总量

    @Column(name = "viscose_optimal_count")
    private Integer viscoseOptimalCount;//粘胶机优品量

    @Column(name = "power_consumption_count")
    private Integer powerConsumptionCount;//耗电量

    @Column(name = "gas_consumption_count")
    private Integer gasConsumptionCount;//耗气量

    @Column(name = "normal_start_proportion")
    private Integer normalStartProportion;//正常开机占比

    @Column(name = "error_stop_proportion")
    private Integer errorStopProportion;//故障停机百分比

    @Column(name = "normal_stop_proportion")
    private Integer normalStopProportion;//正常停机百分比

    @Column(name = "machine_type")
    private Integer machineType;//机器类型

    @Column(name = "speed")
    private Integer speed;//速度

    @Column(name = "flag")
    private Integer flag;//是否换料标识

    @Column(name = "uuid")
    private String uuid;

    @Column(name = "ids", length = 5000)
    private String ids;//相同状态的id
}
